<html>
<head><meta charset="utf-8"><title>999...9.0 - 999...8.0 · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/999.2E.2E.2E9.2E0.20-.20999.2E.2E.2E8.2E0.html">999...9.0 - 999...8.0</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="154506638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/999...9.0%20-%20999...8.0/near/154506638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/999.2E.2E.2E9.2E0.20-.20999.2E.2E.2E8.2E0.html#154506638">(Jan 06 2019 at 08:19)</a>:</h4>
<p>how to get the correct result in rust(from an interesting <a href="https://news.ycombinator.com/item?id=18832155" target="_blank" title="https://news.ycombinator.com/item?id=18832155">HN</a> thread?</p>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">9999999999999999.0</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mf">9999999999999998.0</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="n">assert_eq</span><span class="o">!</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=397cf6ad371e03c0e816e94a8ed300e3" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=397cf6ad371e03c0e816e94a8ed300e3">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=397cf6ad371e03c0e816e94a8ed300e3</a></p>



<a name="154506769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/999...9.0%20-%20999...8.0/near/154506769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/999.2E.2E.2E9.2E0.20-.20999.2E.2E.2E8.2E0.html#154506769">(Jan 06 2019 at 08:23)</a>:</h4>
<p><a href="https://crates.io/crates/rustc_apfloat" target="_blank" title="https://crates.io/crates/rustc_apfloat">apfloat</a></p>



<a name="154506812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/999...9.0%20-%20999...8.0/near/154506812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/999.2E.2E.2E9.2E0.20-.20999.2E.2E.2E8.2E0.html#154506812">(Jan 06 2019 at 08:24)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> now that apfloat is a nice external crate, perhaps releasing a proper <code>apfloat</code> and making the compiler depend on it would be great?</p>



<a name="154506825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/999...9.0%20-%20999...8.0/near/154506825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/999.2E.2E.2E9.2E0.20-.20999.2E.2E.2E8.2E0.html#154506825">(Jan 06 2019 at 08:25)</a>:</h4>
<p>thanks <span class="emoji emoji-1f642" title="slight smile">:slight_smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>